package com.a.ims.service.impl;

import com.a.ims.entity.Cardmate;
import com.a.ims.mapper.CardmateMapper;
import com.a.ims.service.CardmateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class CardmateServiceImpl implements CardmateService {

    private final CardmateMapper cardmateMapper;

    @Autowired
    public CardmateServiceImpl(CardmateMapper cardmateMapper) {
        this.cardmateMapper = cardmateMapper;
    }

    @Override
    public List<Cardmate> selectAll() {
        return cardmateMapper.selectAll();
    }

    @Override
    public int insert(Cardmate cardmate) {
        return cardmateMapper.insert(cardmate);
    }

    @Override
    public int update(Cardmate cardmate) {
        return cardmateMapper.update(cardmate);
    }

    @Override
    public int delete(Integer id) {
        return cardmateMapper.delete(id);
    }
}